<template>
    <div>
       <p> {{message}}</p> 
       <button @click="sendMessageToParent">222</button>
    </div>
</template>
<script setup lang="ts">
import {defineProps,defineEmits} from 'vue'
defineProps<{
    message:string 
}>()
const emit = defineEmits<{
    (event:'send-message',message:string):void
}>()
const sendMessageToParent = () =>{  
    emit('send-message','hello')
}
</script>
<style scoped lang="scss">

</style>
